@extends('layouts.page')
@section('css')
     {{ HTML::style('assets/css/admin.css') }}
  <style>
    .header {
      text-align: center;
    }
    .header h1 {
      font-size: 200%;
      color: #333;
      margin-top: 30px;
    }
    .header p {
      font-size: 14px;
    }
  </style>
@stop

@section('main')
<div class="header">
  <div class="am-g">
    <h1>登录蔓茂花廊</h1>
  </div>
  <hr />
</div>
<div class="am-g">
  <div class="am-u-lg-6 am-u-md-8 am-u-sm-centered">
    <!-- 
    <div class="am-btn-group">
      <a href="#" class="am-btn am-btn-secondary am-btn-sm"><i class="am-icon-github am-icon-sm"></i> Github</a>
      <a href="#" class="am-btn am-btn-success am-btn-sm"><i class="am-icon-google-plus-square am-icon-sm"></i> Google+</a>
      <a href="#" class="am-btn am-btn-primary am-btn-sm"><i class="am-icon-stack-overflow am-icon-sm"></i> stackOverflow</a>
    </div>
     -->
    <form method="post" class="am-form" action="{{URL::route('login')}}" id="loginForm" name="loginForm">
  
      <label for="email">邮箱:</label>
      <input type="text" name="email" id="email" value="{{$email}}" 
      	data-rules="required|valid_email" class="validate" data-display="邮箱">
      <br>
      <label for="password">密码:</label>
      <input type="password" name="password" id="password" value="" 
      	data-display="密码" data-rules="required" class="validate">
      <br>
      <!-- 
      <label for="remember-me">
        <input id="remember-me" type="checkbox">记住密码
      </label>
       -->
      <div class="am-cf">
      	{{Form::token()}}
        <input type="submit" name="" value="登 录" class="am-btn am-btn-primary am-btn-sm am-fl">
        <!-- 
        <input type="submit" name="" value="忘记密码 ^_^? " class="am-btn am-btn-default am-btn-sm am-fr">
         -->
      </div>
      <p class="am-text-danger error-msg">
      	{{Session::get('errorMsg')}}
      </p>
    </form>
    <hr>
    <p>© 2015 蔓茂花廊</p>
  </div>
</div>
@stop
@section('script')
    <script type="text/javascript">
	var $my_form =  $("#loginForm").validate(function($form,errors,events){
		$(".error-msg").html("");
		$.each(errors,function(i,e){
			$(".error-msg").append(e.message+"<br>");
		});
	});
	</script>
@stop